<%@page isELIgnored="false" pageEncoding="UTF-8" contentType="text/html; UTF-8" %>



<table id="bannerTable"></table>



<script type="text/javascript">

    $(function () {
        $("#bannerTable").datagrid({
            title:"轮播图列表",
            url:"${pageContext.request.contextPath}/banner/fenyee",
            width:600,
            columns:[[
                {checkbox:true,field:"dfgfd"},
                {field:"id",title:"轮播图ID"},
                {field:"imageUrl",title:"图片地址",
                    formatter:function (value,row,index) {
                        return  "<img  width='40px' height='20px' src='${pageContext.request.contextPath}"+row.url+"'/>"
                     },
                },
                {field:"name",title:"轮播图名字"},
                {field:"state",title:"轮播图状态",
                    formatter:function (value,row,index) {
                        if(row.state==2){
                            return "正常";
                        }else {
                            return "已删除";
                        }
                    }
                },
                {field:"date",title:"上传日期"},
                {field:"description",title:"描述"},
            ]]
        })
    })

</script>